import { defineConfig } from "vite";
import vue from "@vitejs/plugin-vue";
// 配置静态资源访问
import path from "path";
// px转 vw
export default defineConfig({
  port: 5173,
  base: "./",
  server: {
    proxy: {
      "/api": {
        // target: "https://admin.zhongyimotor.com/api",
        target: "http://192.168.200.140:90/api",
        changeOrigin: true,
        rewrite: (path) => path.replace(/^\/api/, ""),
      },
    },
  },
  resolve: {
    alias: {
      "@": path.resolve(__dirname, "src"),
    },
  },
  //配置需要使用的插件列表
  plugins: [vue()],
});
